package com.example.rbac.service;

import com.example.rbac.entity.Menu;
import com.example.rbac.entity.RoleMenu;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/10/12.
 */
public interface MenuService extends CurdService<Menu>{
    List<String> findMenuByRoleId(List<String> list);

    List<Menu> findMenuByMenuId(List<String> list);

    List<Menu> findList();

    Integer deleteMenuById(String id);

    List<Menu> findMenuByUserId(String id);

    Integer insertByPermission(List<RoleMenu> roleMenus);

    Integer updateByPermission(String roleId, List<RoleMenu> roleMenus);

    List<Menu> findMenuListByRoleId(String id);

    Menu getMenuByUrl(String url);

    Integer updateBySort(@Param("list") List<Menu> list);
}
